{extend name='extra@admin/content'}

{block name="button"}
<div class="nowrap pull-right" style="margin-top:10px">
    <a href='javascript:;' class='layui-btn layui-btn-small' style="text-decoration:none" onclick="daochu();"> <i
            class='fa fa-download'></i> 导出</a>
</div>
{/block}

{block name="content"}


<!-- 表单搜索 开始 -->
<form class="layui-form layui-form-pane form-search" action="__SELF__" onsubmit="return false" method="get">
    <div class="layui-form-item layui-inline">
        <label class="layui-form-label">商品名称</label>
        <div class="layui-input-inline">
            <input id="name" name="name" value="{$Think.get.name|default=''}" placeholder="请输入商品名称" class="layui-input">
        </div>
    </div>


    <div class="layui-form-item layui-inline">
        <button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button>
    </div>
</form>
<!-- 表单搜索 结束 -->
<table class="layui-table" lay-skin="line" lay-size="sm">
    <thead>
    <tr>
        <th class='text-left nowrap'>商品ID</th>
        <th class='text-left nowrap'>商品名称</th>
        <th class='text-left nowrap'>商品属性</th>
        <th class='text-left nowrap'>入库</th>
        <th class='text-left nowrap'>出库</th>
        <th class='text-left nowrap'>退货</th>
        <th class='text-left nowrap'>报损</th>
        <th class='text-left nowrap'>当时库存</th>
        <th class='text-left nowrap'>备注</th>
        <th class='text-left nowrap'>时间</th>
    </tr>
    </thead>
    <tbody>
    {volist name='list' id='vo'}
    <tr>
        <td class='text-left nowrap'>
            {$vo.gid}
        </td>
        <td class='text-left nowrap'>
            {$vo.name}
        </td>
        <td class='text-left nowrap'>
            {$vo.title}
        </td>
        <td class='text-left nowrap'>
            {$vo.ruku_num}
        </td>
        <td class='text-left nowrap'>
            {$vo.chuku_num}
        </td>
        <td class='text-left nowrap'>
            {$vo.tuihuo_num}
        </td>
        <td class='text-left nowrap'>
            {$vo.sunhao_num}
        </td>
        <td class='text-left nowrap'>
            {$vo.cur_stock}
        </td>
        <td class='text-left nowrap'>
            {$vo.remark}
        </td>
        <td class='text-left nowrap'>
            {$vo.atime|date='Y-m-d H:i:s',###}
        </td>
    </tr>
    {/volist}
    </tbody>
</table>
{if isset($page)}<p>{$page}</p>{/if}
<script>
    window.laydate.render({range: true, elem: '#range-date', format: 'yyyy/MM/dd'});
    function daochu() {
        var name = $('#name').val();       //搜索条件
        window.location = '{:url("$classuri/log")}?export=1&name=' + name;
    }
</script>
{/block}